txt = "Hello Sam!";

mytable = txt.maketrans("S", "P");

print(txt.translate(mytable));
